<?php

namespace mpend\modules\cms\controllers;

use Yii;
use mpend\components\Controller;
use mpend\modules\cms\models\ArticleViewSearch;

/**
 * 默认检索相关接口
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class ArticleController extends Controller {

    /**
     * 停用token校验
     *
     * @inheritdoc
     */
    public $filterAccessToken = false;
    public $modelClass = ArticleViewSearch::class;

    /**
     * 每日答题信息
     * {@inheritdoc}
     */
    public function actions() {
        return [
            'view' => [
                'class' => 'yii\rest\ViewAction',
                'modelClass' => $this->modelClass,
//                'checkAccess' => function ($action, $model) {
//                    GameUserStageLog::unlock($this->uid, $model->id);
//                }
            ],
        ];
    }

}
